package com.Bride.smarthome.config.mybatisplus;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/*
  2025/9/8
  com.Bride.smarthome.config.mybatisplus
  @author winkin
*/
@Configuration
@MapperScan({"com.Bride.smarthome.dao.mysql.Smart", "com.Bride.smarthome.dao.mysql.Device"})
public class MyBatisConfig {

    /**
     * MyBatis-Plus分页插件配置
     */
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
        return interceptor;
    }
}
